Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Fix invalid-escape-sequence (W605) #4409

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

echoix
Copy link
Member

@echoix echoix commented Sep 28, 2024

Ruff rule: https://docs.astral.sh/ruff/rules/invalid-escape-sequence/

Even though it fixes the invalid escape sequence, I still think that these stings are wrong, or don't do what we expect them to do.

For example, I would expect the string INPUT_TSV to have tabs, but there aren't, nor at the first commit of that file 7 years ago in 007fe9c.

The backslashes needed in imagery/i.pca/testsuite/test_pca.py seem weird to me too, as wouldn't there be some newlines somewhere?

@echoix echoix added this to the 8.5.0 milestone Sep 28, 2024
@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python module imagery tests Related to Test Suite labels Sep 28, 2024
@petrasovaa
Copy link
Contributor

For example, I would expect the string INPUT_TSV to have tabs, but there aren't, nor at the first commit of that file 7 years ago in 007fe9c.

These tests were part of Google code-in and some of them shouldn't have been merged... I suggest to completely remove the test_tsv and test_uncommon_delims because there is nothing in r.in.ascii documentation that suggests this should work.

@echoix echoix requested a review from petrasovaa October 2, 2024 17:35
@echoix echoix enabled auto-merge (squash) October 4, 2024 15:32
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure with the pca test, but as long as it fixes the warning and tests pass, I would merge it.

@echoix echoix merged commit 1e86629 into OSGeo:main Oct 4, 2024
26 checks passed
@echoix echoix deleted the fix-W605-invalid-escape-sequence branch October 4, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants